package com.ccb.testcenter.servicemaping;

import java.util.List;

import com.ccb.testcenter.servicemapingconfig.DataContext;

/**
 * 
 * 类名：Mapping 
 * 创建人：li_dk 
 * 修改人：li_dk 
 * 创建时间：2017年1月6日 下午3:30:41
 * 修改时间：2017年1月6日下午3:30:41 
 * 文件版本：@version 1.0.0
 *
 */
public class Mapping {
	
	private Trcd trcd;
	private List<IFilter> filters;
	private Request request;
	private Response response;

	public Trcd getTrcd() {
		return trcd;
	}

	public void setTrcd(Trcd trcd) {
		this.trcd = trcd;
	}
	public List<IFilter> getFilters() {
		return filters;
	}

	public void setFilters(List<IFilter> filters) {
		this.filters = filters;
	}

	public Request getRequest() {
		return request;
	}

	public void setRequest(Request request) {
		this.request = request;
	}

	public Response getResponse() {
		return response;
	}

	public void setResponse(Response response) {
		this.response = response;
	}
   
	public boolean doFilters(String contextData){
		  for (int i = 0; i < filters.size(); i++) {
			   if(filters.get(i).doFilter(contextData)){
				   return false;
			   }
		}
		return true;		
	}
}
